<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test.js"></script>
<script src="resources/common.js"></script>
<form method="get" action="?">
    <input type="hidden" name="hidden" value="I am hidden" />
    <input id="button" formmethod="post" type="submit" name="button" />
</form>
<script>
description("Test for the formmethod attribute in input tags.");
if (window.testRunner) {
    testRunner.waitUntilDone();
}

var button = document.getElementById('button');

if (document.URL.substring(0, 4) == "file") {
    if (document.URL.indexOf('?') == -1) {
        clickElement(button);
    } else {
        if (document.URL.substring(document.URL.indexOf('?') + 1, document.URL.length) == "")
            testPassed('The formmethod attribute was successfully used');
        else
            testFailed('The formmethod attribute was not used');

        if (window.testRunner)
            testRunner.notifyDone();
    }
}
</script>
</body>
</html>
